package com.ym.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("ajax")
public class AjaxController {

    @RequestMapping(value = "test",method = RequestMethod.POST)
    public @ResponseBody String ajax(@RequestBody String name,int age){
        System.out.println(name);
        System.out.println(age);
        return "aaaaaaa";
    }
}
